﻿using LeSoft.Application.Bussiness;
using LeSoft.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LeSoft.Application.Web.Areas.PropertyManage.Controllers
{
    public class CS_PollingBussinessController : MvcControllerBase
    {
        private WorkingBillPerformanceBLL bll = new WorkingBillPerformanceBLL();
        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult GetListJson(Pagination pagination, string condition, string keyword)
        {
            var watch = CommonHelper.TimerStart();
            var data = bll.GetList(pagination, condition, keyword);
            var JsonData = new
            {
                rows = data,
                total = pagination.total,
                page = pagination.page,
                records = pagination.records,
                costtime = CommonHelper.TimerEnd(watch)
            };
            return Content(JsonData.ToJson());
        }
    }
}
